import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 04 - 16
 * Time: 15:38
 */
//输出一个整数的每一位
public class test4 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int tmp = n;
        while(tmp != 0) {
            System.out.println(tmp % 10);
            tmp = tmp / 10;
        }
    }
}
